﻿<html>

<head>
<meta http-equiv=Content-Type content="text/html; charset=UTF-8">
<meta name=Generator content="Microsoft Word 14 (filtered)">
<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:宋体;
	panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
	{font-family:宋体;
	panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
	{font-family:"\@宋体";
	panose-1:2 1 6 0 3 1 1 1 1 1;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.5pt;
	font-family:"Times New Roman","serif";}
h1
	{mso-style-link:"标题 1 Char";
	margin-right:0cm;
	margin-left:0cm;
	font-size:24.0pt;
	font-family:宋体;}
h3
	{mso-style-link:"标题 3 Char";
	margin-top:13.0pt;
	margin-right:0cm;
	margin-bottom:13.0pt;
	margin-left:0cm;
	text-align:justify;
	text-justify:inter-ideograph;
	line-height:173%;
	page-break-after:avoid;
	font-size:16.0pt;
	font-family:"Times New Roman","serif";}
p.MsoHeader, li.MsoHeader, div.MsoHeader
	{margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	layout-grid-mode:char;
	border:none;
	padding:0cm;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.MsoFooter, li.MsoFooter, div.MsoFooter
	{margin:0cm;
	margin-bottom:.0001pt;
	layout-grid-mode:char;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
span.1Char
	{mso-style-name:"标题 1 Char";
	mso-style-link:"标题 1";
	font-family:宋体;
	font-weight:bold;}
span.3Char
	{mso-style-name:"标题 3 Char";
	mso-style-link:"标题 3";
	font-weight:bold;}
 /* Page Definitions */
 @page WordSection1
	{size:595.3pt 841.9pt;
	margin:72.0pt 90.0pt 72.0pt 90.0pt;
	layout-grid:15.6pt;}
div.WordSection1
	{page:WordSection1;}
 /* List Definitions */
 ol
	{margin-bottom:0cm;}
ul
	{margin-bottom:0cm;}
-->
</style>

</head>

<body bgcolor=white lang=ZH-CN style='text-justify-trim:punctuation'>

<div class=WordSection1 style='layout-grid:15.6pt'>

<h1 align=center style='text-align:center'>指针教程</h1>

<p class=MsoNormal><span style='font-family:宋体;color:#555555;background:white'>指针是Ｃ语言中广泛使用的一种数据类型。运用指针编程是Ｃ语言最主要的风格之一。利用指针变量可以表示各种数据结构；能很方便地使用数组和字符串；并能象汇编语言一样处理内存地址，从而编出精练而高效的程序。指针极大地丰富了Ｃ语言的功能。学习指针是学习Ｃ语言中最重要的一环，能否正确理解和使用指针是我们是否掌握Ｃ语言的一个标志。同时，指针也是Ｃ语言中最为困难的一部分，在学习中除了要正确理解基本概念，还必须要多编程，上机调试。只要作到这些，指针也是不难掌握的。</span></span></p>

<p class=MsoNormal align=left style='text-align:left'><span style='font-family:
宋体;color:#555555;background:white'>在计算机中，所有的数据都是存放在存储器中的。一般把存储器中的一个字节称为一个内存单元，不同的数据类型所占用的内存单元数不等，如整型量占</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>2</span><span style='font-family:宋体;color:#555555;background:white'>个单元，字符量占</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>1</span><span style='font-family:宋体;color:#555555;background:white'>个单元等，在前面已有详细的介绍。为了正确地访问这些内存单元，必须为每个内存单元编上号。根据一个内存单元的编号即可准确地找到该内存单元。内存单元的编号也叫做地址。既然根据内存单元的编号或地址就可以找到所需的内存单元，所以通常也把这个地址称为指针。</span><span
style='font-family:"Tahoma","sans-serif";color:#555555;background:white'> </span><span
style='font-family:宋体;color:#555555;background:white'>内存单元的指针和内存单元的内容是两个不同的概念。</span><span
style='font-family:"Tahoma","sans-serif";color:#555555;background:white'> </span><span
style='font-family:宋体;color:#555555;background:white'>可以用一个通俗的例子来说明它们之间的关系。我们到银行去存取款时，银行工作人员将根据我们的帐号去找我们的存款单，</span><span
style='font-family:"Tahoma","sans-serif";color:#555555;background:white'> </span><span
style='font-family:宋体;color:#555555;background:white'>找到之后在存单上写入存款、取款的金额。在这里，帐号就是存单的指针，</span><span
style='font-family:"Tahoma","sans-serif";color:#555555;background:white'> </span><span
style='font-family:宋体;color:#555555;background:white'>存款数是存单的内容。对于一个内存单元来说，单元的地址即为指针，其中存放的数据才是该单元的内容。在Ｃ语言中，允许用一个变量来存放指针，这种变量称为指针变量。因此，一个指针变量的值就是某个内存单元的地址或称为某内存单元的指针。</span></p>

<p class=MsoNormal align=center style='text-align:center;line-height:16.5pt;
background:white'><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:#555555'><img width=166 height=94 src="10.files/image001.jpg"
style='text-decoration:initial;border-bottom-width:0px;border-left-width:0px;
border-right-width:0px;border-top-width:0px;font-size:14px;height:94px;
list-style-type:none;margin-bottom:0px;margin-left:0px;margin-right:0px;
margin-top:0px;padding-bottom:0px;padding-left:0px;padding-right:0px;
padding-top:0px;width:166px'></span></p>

<p class=MsoNormal><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:#555555'><br>
</span><span style='font-family:宋体;color:#555555;background:white'>图中，设有字符变量</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>C</span><span style='font-family:宋体;color:#555555;background:white'>，其内容为</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>“K”(ASCII</span><span style='font-family:宋体;color:#555555;background:
white'>码为十进制数</span><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:#555555;background:white'> 75)</span><span style='font-family:宋体;
color:#555555;background:white'>，</span><span lang=EN-US style='font-family:
"Tahoma","sans-serif";color:#555555;background:white'>C</span><span
style='font-family:宋体;color:#555555;background:white'>占用了</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>011A</span><span style='font-family:宋体;color:#555555;background:white'>号单元</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>(</span><span style='font-family:宋体;color:#555555;background:white'>地址用十六进数表示</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>)</span><span style='font-family:宋体;color:#555555;background:white'>。设有指针变量</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>P</span><span style='font-family:宋体;color:#555555;background:white'>，内容为</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>011A</span><span style='font-family:宋体;color:#555555;background:white'>，这种情况我们称为</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>P</span><span style='font-family:宋体;color:#555555;background:white'>指向变量</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>C</span><span style='font-family:宋体;color:#555555;background:white'>，或说</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>P</span><span style='font-family:宋体;color:#555555;background:white'>是指向变量</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>C</span><span style='font-family:宋体;color:#555555;background:white'>的指针。</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555'><br>
<br>
</span><span style='font-family:宋体;color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>严格地说，一个指针是一个地址，是一个常量。而一个指针变量却可以被赋予不同的指针值，是变量。但常把指针变量简称为指针。为了避免混淆，我们中约定：</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>“</span><span style='font-family:宋体;color:green;
border:none windowtext 1.0pt;padding:0cm;background:white'>指针</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>”</span><span style='font-family:宋体;color:green;
border:none windowtext 1.0pt;padding:0cm;background:white'>是指地址，是常量，</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>“</span><span style='font-family:宋体;color:green;
border:none windowtext 1.0pt;padding:0cm;background:white'>指针变量</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>”</span><span style='font-family:宋体;color:green;
border:none windowtext 1.0pt;padding:0cm;background:white'>是指取值为地址的变量。定义指针的目的是为了通过指针去访问内存单元。</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555'><br>
<br>
</span><span style='font-family:宋体;color:#555555;background:white'>既然指针变量的值是一个地址，那么这个地址不仅可以是变量的地址，也可以是其它数据结构的地址。在一个指针变量中存放一个数组或一个函数的首地址有何意义呢？因为数组或函数都是连续存放的。通过访问指针变量取得了数组或函数的首地址，也就找到了该数组或函数。这样一来，凡是出现数组，函数的地方都可以用一个指针变量来表示，只要该指针变量中赋予数组或函数的首地址即可。这样做，将会使程序的概念十分清楚，程序本身也精练，高效。在Ｃ语言中，一种数据类型或数据结构往往都占有一组连续的内存单元。用</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>“</span><span style='font-family:宋体;color:#555555;background:white'>地址</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>”</span><span style='font-family:宋体;color:#555555;background:white'>这个概念并不能很好地描述一种数据类型或数据结构，而</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>“</span><span style='font-family:宋体;color:#555555;background:white'>指针</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>”</span><span style='font-family:宋体;color:#555555;background:white'>虽然实际上也是一个地址，但它却是一个数据结构的首地址，它是</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>“</span><span style='font-family:宋体;color:#555555;background:white'>指向</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>”</span><span style='font-family:宋体;color:#555555;background:white'>一个数据结构的，因而概念更为清楚，表示更为明确。</span><span
style='font-family:"Tahoma","sans-serif";color:#555555;background:white'> </span><span
style='font-family:宋体;color:#555555;background:white'>这也是引入</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>“</span><span style='font-family:宋体;color:#555555;background:white'>指针</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>”</span><span style='font-family:宋体;color:#555555;background:white'>概念的一个重要原因</span></p>

<p class=MsoNormal><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:#555555;background:white'>&nbsp;</span></p>

<p class=MsoNormal><strong><span style='font-family:宋体;color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>变量的指针就是变量的地址。存放变量地址的变量是指针变量。</span></span></strong><span
style='font-family:宋体;color:#555555;background:white'><span style='orphans: 2;
text-align:start;widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>即在Ｃ语言中，允许用一个变量来存放指针，这种变量称为指针变量。因此，一个指针变量的值就是某个变量的地址或称为某变量的指针。</span></span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555'><br
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
<br style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
</span><span style='font-family:宋体;color:#555555;background:white'><span
style='orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;float:none;word-spacing:0px'>为了表示指针变量和它所指向的变量之间的关系，在程序中用</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>“*”</span><span style='font-family:宋体;color:#555555;background:white'>符号表示</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>“</span><span style='font-family:宋体;color:#555555;background:white'>指向</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>”</span><span style='font-family:宋体;color:#555555;background:white'>，例如，</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>i_pointer</span><span style='font-family:宋体;color:#555555;background:
white'>代表指针变量，而</span><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:#555555;background:white'>*i_pointer</span><span style='font-family:宋体;
color:#555555;background:white'>是</span><span lang=EN-US style='font-family:
"Tahoma","sans-serif";color:#555555;background:white'>i_pointer</span><span
style='font-family:宋体;color:#555555;background:white'>所指向的变量。因此，下面两个语句作用相同：</span></span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555'><br
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>&nbsp; &nbsp; &nbsp; i=3;</span></span><br
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>&nbsp; &nbsp; &nbsp; *i_pointer=3;</span></span><br
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
</span><span style='font-family:宋体;color:#555555;background:white'><span
style='orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;float:none;word-spacing:0px'>第二个语句的含义是将</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>3</span><span style='font-family:宋体;color:#555555;background:white'>赋给指针变量</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>i_pointer</span><span style='font-family:宋体;color:#555555;background:
white'>所指向的变量。</span></span><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:#555555'><br style='text-decoration:initial;orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
word-spacing:0px'>
<br>
</span></p>

<h3 style='margin:0cm;margin-bottom:.0001pt;line-height:30.0pt;background:white;
vertical-align:middle'><span style='text-decoration:initial'><span lang=EN-US
style='font-size:12.0pt;font-family:"Tahoma","sans-serif";color:red;border:
none windowtext 1.0pt;padding:0cm'>10.1.1</span><span style='font-size:12.0pt;
font-family:宋体;color:red;border:none windowtext 1.0pt;padding:0cm'>定义一个指针变量</span></span></h3>

<p class=MsoNormal><strong style='text-decoration:initial'><span
style='font-family:宋体;color:green;border:none windowtext 1.0pt;padding:0cm;
background:white'><span style='text-decoration:initial;orphans: 2;text-align:
start;widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
word-spacing:0px'>对指针变量的定义包括三个内容：</span></span></strong><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:#555555'><br style='text-decoration:
initial;orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'>
<br>
</span></p>

<p class=MsoNormal align=left style='margin-left:22.5pt;text-align:left;
text-indent:-18.0pt;line-height:16.5pt;background:white'><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:#555555'>1.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体;color:#555555'>指针类型说明，即定义变量为一个指针变量；</span></p>

<p class=MsoNormal align=left style='margin-left:22.5pt;text-align:left;
text-indent:-18.0pt;line-height:16.5pt;background:white'><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:#555555'>2.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体;color:#555555'>指针变量名；</span></p>

<p class=MsoNormal align=left style='margin-left:22.5pt;text-align:left;
text-indent:-18.0pt;line-height:16.5pt;background:white'><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:#555555'>3.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体;color:#555555'>变量值</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555'>(</span><span
style='font-family:宋体;color:#555555'>指针</span><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:#555555'>)</span><span
style='font-family:宋体;color:#555555'>所指向的变量的数据类型。</span></p>

<p class=MsoNormal><span style='font-family:宋体;color:#555555;background:white'><span
style='orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;float:none;word-spacing:0px'>其一般形式为：类型说明符</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>&nbsp; *</span><span style='font-family:宋体;color:#555555;background:
white'>变量名；</span></span><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:#555555'><br style='text-decoration:initial;orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
word-spacing:0px'>
</span><span style='font-family:宋体;color:#555555;background:white'><span
style='orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;float:none;word-spacing:0px'>其中，</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>*</span><span style='font-family:宋体;color:#555555;background:white'>表示这是一个指针变量，变量名即为定义的指针变量名，类型说明符表示本指针变量所指向的变量的数据类型。</span></span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555'><br
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
<br style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
</span><span style='font-family:宋体;color:#555555;background:white'><span
style='orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;float:none;word-spacing:0px'>例如：</span></span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555'><br
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>&nbsp;&nbsp;&nbsp; int *p1;</span></span><br
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
</span><span style='font-family:宋体;color:#555555;background:white'><span
style='orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;float:none;word-spacing:0px'>表示</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>p1</span><span style='font-family:宋体;color:#555555;background:white'>是一个指针变量，它的值是某个整型变量的地址。或者说</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>p1</span><span style='font-family:宋体;color:#555555;background:white'>指向一个整型变量。至于</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>p1</span><span style='font-family:宋体;color:#555555;background:white'>究竟指向哪一个整型变量，应由向</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>p1</span><span style='font-family:宋体;color:#555555;background:white'>赋予的地址来决定。</span></span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555'><br
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
<br style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
</span><span style='font-family:宋体;color:#555555;background:white'><span
style='orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;float:none;word-spacing:0px'>再如：</span></span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555'><br
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>&nbsp; &nbsp; int
*p2;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /*p2</span></span><span
style='font-family:宋体;color:#555555;background:white'>是指向整型变量的指针变量</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>*/</span></span><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:#555555'><br style='text-decoration:initial;orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
word-spacing:0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>&nbsp;&nbsp;&nbsp; float
*p3;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /*p3</span></span><span style='font-family:
宋体;color:#555555;background:white'>是指向浮点变量的指针变量</span><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:#555555;background:white'>*/</span></span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555'><br
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>&nbsp; &nbsp; char
*p4;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /*p4</span></span><span
style='font-family:宋体;color:#555555;background:white'>是指向字符变量的指针变量</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>*/</span></span><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:#555555'><br style='text-decoration:initial;orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
word-spacing:0px'>
<br style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
</span><span style='font-family:宋体;color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'><span style='text-decoration:initial;orphans: 2;
text-align:start;widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
word-spacing:0px'>应该注意的是，一个指针变量只能指向同类型的变量，如</span><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>P3 </span><span style='font-family:宋体;color:green;
border:none windowtext 1.0pt;padding:0cm;background:white'>只能指向浮点变量，不能时而指向一个浮点变量，时而又指向一个字符变量。</span></span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>\</span></p>

<p class=MsoNormal><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:green;border:none windowtext 1.0pt;padding:0cm;background:white'>&nbsp;</span></p>

<p class=MsoNormal align=left style='text-align:left'><span style='font-family:
宋体;color:#555555;background:white'>指针变量同普通变量一样，使用之前不仅要定义说明，而且必须赋予具体的值。未经赋值的指针变量不能使用，否则将造成系统混乱，甚至死机。指针变量的赋值只能赋予地址，决不能赋予任何其它数据，否则将引起错误。</span><span
style='font-family:宋体;color:blue;border:none windowtext 1.0pt;padding:0cm;
background:white'>在Ｃ语言中，变量的地址是由编译系统分配的，对用户完全透明，用户不知道变量的具体地址。</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555'><br>
<br>
</span><b><span style='font-family:宋体;color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>两个有关的运算符：</span></b><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:#555555'><br>
<br>
</span></p>

<p class=MsoNormal align=left style='margin-left:22.5pt;text-align:left;
text-indent:-18.0pt;line-height:16.5pt;background:white'><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:#555555'>1.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:#555555'>&amp;:</span><span style='font-family:宋体;color:#555555'>取地址运算符。</span></p>

<p class=MsoNormal align=left style='margin-left:22.5pt;text-align:left;
text-indent:-18.0pt;line-height:16.5pt;background:white'><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:#555555'>2.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:#555555'>*</span><span style='font-family:宋体;color:#555555'>：指针运算符（或称</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555'>“</span><span
style='font-family:宋体;color:#555555'>间接访问</span><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:#555555'>” </span><span
style='font-family:宋体;color:#555555'>运算符）。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span style='font-family:
宋体;color:#555555;background:white'>Ｃ语言中提供了地址运算符</span><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:#555555;background:white'>&amp;</span><span
style='font-family:宋体;color:#555555;background:white'>来表示变量的地址。其一般形式为：</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>&amp;</span><span style='font-family:宋体;color:#555555;background:white'>变量名；</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555'><br>
</span><span style='font-family:宋体;color:#555555;background:white'>如</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>&amp;a</span><span style='font-family:宋体;color:#555555;background:white'>表示变量</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>a</span><span style='font-family:宋体;color:#555555;background:white'>的地址，</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>&amp;b</span><span style='font-family:宋体;color:#555555;background:white'>表示变量</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>b</span><span style='font-family:宋体;color:#555555;background:white'>的地址。变量本身必须预先说明。</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555'><br>
<br>
</span><b><span style='font-family:宋体;color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>设有指向整型变量的指针变量</span></b><b><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>p</span></b><b><span style='font-family:宋体;
color:green;border:none windowtext 1.0pt;padding:0cm;background:white'>，如要把整型变量</span></b><b><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>a </span></b><b><span style='font-family:宋体;
color:green;border:none windowtext 1.0pt;padding:0cm;background:white'>的地址赋予</span></b><b><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>p</span></b><b><span style='font-family:宋体;
color:green;border:none windowtext 1.0pt;padding:0cm;background:white'>可以有以下两种方式：</span></b><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555'><br>
<br>
</span><span lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;
border:none windowtext 1.0pt;padding:0cm;background:white'>1</span><span
style='font-family:宋体;color:green;border:none windowtext 1.0pt;padding:0cm;
background:white'>、指针变量初始化的方法</span><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:#555555'><br>
<span style='background:white'>&nbsp; &nbsp; &nbsp; int a;</span><br>
<span style='background:white'>&nbsp; &nbsp; &nbsp; int *p=&amp;a;</span><br>
<br>
</span><span lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;
border:none windowtext 1.0pt;padding:0cm;background:white'>2</span><span
style='font-family:宋体;color:green;border:none windowtext 1.0pt;padding:0cm;
background:white'>、赋值语句的方法</span><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:#555555'><br>
<span style='background:white'>&nbsp; &nbsp; &nbsp; int a;</span><br>
<span style='background:white'>&nbsp; &nbsp; &nbsp; int *p;</span><br>
<span style='background:white'>&nbsp; &nbsp; &nbsp; p=&amp;a;</span><br>
<br>
</span><span style='font-family:宋体;color:#555555;background:white'>不允许把一个数赋予指针变量，故下面的赋值是错误的：</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555'><br>
<span style='background:white'>&nbsp; &nbsp; &nbsp;int *p;</span><br>
<span style='background:white'>&nbsp; &nbsp; &nbsp;p=1000;</span><br>
</span><span style='font-family:宋体;color:#555555;background:white'>被赋值的指针变量前不能再加</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>“*”</span><span style='font-family:宋体;color:#555555;background:white'>说明符，如写为</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>*p=&amp;a </span><span style='font-family:宋体;color:#555555;background:
white'>也是错误的。假设</span><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:#555555;background:white'>:</span><span lang=EN-US style='font-family:
"Tahoma","sans-serif";color:#555555'><br>
<span style='background:white'>&nbsp; &nbsp; &nbsp;int i=200, x;</span><br>
<span style='background:white'>&nbsp; &nbsp; &nbsp;int *ip;</span><br>
</span><span style='font-family:宋体;color:#555555;background:white'>我们定义了两个整型变量</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>i,x,</span><span style='font-family:宋体;color:#555555;background:white'>还定义了一个指向整型数的指针变量</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>ip</span><span style='font-family:宋体;color:#555555;background:white'>。</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>i,x</span><span style='font-family:宋体;color:#555555;background:white'>中可存放整数</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>,</span><span style='font-family:宋体;color:#555555;background:white'>而</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>ip</span><span style='font-family:宋体;color:#555555;background:white'>中只能存放整型变量的地址。我们可以把</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>i</span><span style='font-family:宋体;color:#555555;background:white'>的地址赋给</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>ip</span><span style='font-family:宋体;color:#555555;background:white'>：</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>ip=&amp;i;</span><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:#555555'><br>
<br>
</span><span style='font-family:宋体;color:#555555;background:white'>此时指针变量</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>ip</span><span style='font-family:宋体;color:#555555;background:white'>指向整型变量</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>i,</span><span style='font-family:宋体;color:#555555;background:white'>假设变量</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>i</span><span style='font-family:宋体;color:#555555;background:white'>的地址为</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>1800,</span><span style='font-family:宋体;color:#555555;background:white'>这个赋值可形象理解为下图所示的联系。以后我们便可以通过指针变量</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>ip</span><span style='font-family:宋体;color:#555555;background:white'>间接访问变量</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>i,</span><span style='font-family:宋体;color:#555555;background:white'>例如</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>:</span><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:#555555'><br>
<span style='background:white'>&nbsp;&nbsp;&nbsp;&nbsp; x=*ip;</span><br>
</span><span style='font-family:宋体;color:#555555;background:white'>运算符</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>*</span><span style='font-family:宋体;color:#555555;background:white'>访问以</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>ip</span><span style='font-family:宋体;color:#555555;background:white'>为地址的存贮区域</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>,</span><span style='font-family:宋体;color:#555555;background:white'>而</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>ip</span><span style='font-family:宋体;color:#555555;background:white'>中存放的是变量</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>i</span><span style='font-family:宋体;color:#555555;background:white'>的地址</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>,</span><span style='font-family:宋体;color:#555555;background:white'>因此</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>,*ip</span><span style='font-family:宋体;color:#555555;background:white'>访问的是地址为</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>1800</span><span style='font-family:宋体;color:#555555;background:white'>的存贮区域</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>(</span><span style='font-family:宋体;color:#555555;background:white'>因为是整数</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>,</span><span style='font-family:宋体;color:#555555;background:white'>实际上是从</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>1800</span><span style='font-family:宋体;color:#555555;background:white'>开始的两个字节</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>),</span><span style='font-family:宋体;color:#555555;background:white'>它就是</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>i</span><span style='font-family:宋体;color:#555555;background:white'>所占用的存贮区域</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>, </span><span style='font-family:宋体;color:#555555;background:white'>所以上面的赋值表达式等价于</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555'><br>
<span style='background:white'>&nbsp;&nbsp;&nbsp;&nbsp; x=i;</span><br>
</span><span style='font-family:宋体;color:#555555;background:white'>另外</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>,</span><span style='font-family:宋体;color:#555555;background:white'>指针变量和一般变量一样</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>,</span><span style='font-family:宋体;color:#555555;background:white'>存放在它们之中的值是可以改变的</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>,</span><span style='font-family:宋体;color:#555555;background:white'>也就是说可以改变它们的指向</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>,</span><span style='font-family:宋体;color:#555555;background:white'>假设</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555'><br>
<span style='background:white'>&nbsp; &nbsp; &nbsp;int i,j,*p1,*p2;</span><br>
<span style='background:white'>&nbsp; &nbsp; &nbsp;i='a';</span><br>
<span style='background:white'>&nbsp; &nbsp; &nbsp;j='b';</span><br>
<span style='background:white'>&nbsp; &nbsp; &nbsp;p1=&amp;i;</span><br>
<span style='background:white'>&nbsp; &nbsp; &nbsp;p2=&amp;j;</span><br>
</span><span style='font-family:宋体;color:#555555;background:white'>则建立如下图所示的联系。这时赋值表达式</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>:</span><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:#555555'><br>
<span style='background:white'>&nbsp; &nbsp; &nbsp; p2=p1</span><br>
</span><span style='font-family:宋体;color:#555555;background:white'>就使</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>p2</span><span style='font-family:宋体;color:#555555;background:white'>与</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>p1</span><span style='font-family:宋体;color:#555555;background:white'>指向同一对象</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>i,</span><span style='font-family:宋体;color:#555555;background:white'>此时</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>*p2</span><span style='font-family:宋体;color:#555555;background:white'>就等价于</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>i,</span><span style='font-family:宋体;color:#555555;background:white'>而不是</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>j,</span><span style='font-family:宋体;color:#555555;background:white'>图所示。</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555'><br>
</span><span lang=EN-US style='font-size:12.0pt;font-family:宋体'><img width=32
height=32 src="10.files/image002.png" style='text-decoration:initial;
orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;background-color:white;border-bottom-width:0px;
border-left-width:0px;border-right-width:0px;border-top-width:0px;color:#555555;
font-family:Tahoma, Verdana, sans-serif;font-size:14px;font-style:normal;
font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:22px;
list-style-type:none;margin-bottom:0px;margin-left:0px;margin-right:0px;
margin-top:0px;padding-bottom:0px;padding-left:0px;padding-right:0px;
padding-top:0px;text-indent:0px;text-transform:none;white-space:normal;
word-spacing:0px'></span><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:#555555'><br>
<br>
</span><span style='font-family:宋体;color:#555555;background:white'>如果执行如下表达式</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>:</span><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:#555555'><br>
<span style='background:white'>&nbsp; &nbsp; &nbsp; *p2=*p1;</span><br>
</span><span style='font-family:宋体;color:#555555;background:white'>则表示把</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>p1</span><span style='font-family:宋体;color:#555555;background:white'>指向的内容赋给</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>p2</span><span style='font-family:宋体;color:#555555;background:white'>所指的区域</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>, </span><span style='font-family:宋体;color:#555555;background:white'>此时就变成图所示</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555'><br>
</span><span lang=EN-US style='font-size:12.0pt;font-family:宋体'><img width=32
height=32 src="10.files/image002.png" style='text-decoration:initial;
orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;background-color:white;border-bottom-width:0px;
border-left-width:0px;border-right-width:0px;border-top-width:0px;color:#555555;
font-family:Tahoma, Verdana, sans-serif;font-size:14px;font-style:normal;
font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:22px;
list-style-type:none;margin-bottom:0px;margin-left:0px;margin-right:0px;
margin-top:0px;padding-bottom:0px;padding-left:0px;padding-right:0px;
padding-top:0px;text-indent:0px;text-transform:none;white-space:normal;
word-spacing:0px'></span><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:#555555'><br>
<br>
</span><span style='font-family:宋体;color:#555555;background:white'>通过指针访问它所指向的一个变量是以间接访问的形式进行的</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>,</span><span style='font-family:宋体;color:#555555;background:white'>所以比直接访问一个变量要费时间</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>,</span><span style='font-family:宋体;color:#555555;background:white'>而且不直观</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>,</span><span style='font-family:宋体;color:#555555;background:white'>因为通过指针要访问哪一个变量</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>,</span><span style='font-family:宋体;color:#555555;background:white'>取决于指针的值</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>(</span><span style='font-family:宋体;color:#555555;background:white'>即指向</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>),</span><span style='font-family:宋体;color:#555555;background:white'>例如</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>&quot;*p2=*p1;&quot;</span><span style='font-family:宋体;color:#555555;
background:white'>实际上就是</span><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:#555555;background:white'>&quot;j=i;&quot;,</span><span style='font-family:
宋体;color:#555555;background:white'>前者不仅速度慢而且目的不明。但由于指针是变量</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>,</span><span style='font-family:宋体;color:#555555;background:white'>我们可以通过改变它们的指向</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>,</span><span style='font-family:宋体;color:#555555;background:white'>以间接访问不同的变量</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>,</span><span style='font-family:宋体;color:#555555;background:white'>这给程序员带来灵活性</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>,</span><span style='font-family:宋体;color:#555555;background:white'>也使程序代码编写得更为简洁和有效。</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555'><br>
<br>
</span><span style='font-family:宋体;color:#555555;background:white'>指针变量可出现在表达式中</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>, </span><span style='font-family:宋体;color:#555555;background:white'>设</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555'><br>
<span style='background:white'>&nbsp; &nbsp; &nbsp; int x,y</span></span><span
style='font-family:宋体;color:#555555;background:white'>，</span><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:#555555;background:white'>*px=&amp;x;</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555'><br>
</span><span style='font-family:宋体;color:#555555;background:white'>指针变量</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>px</span><span style='font-family:宋体;color:#555555;background:white'>指向整数</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>x,</span><span style='font-family:宋体;color:#555555;background:white'>则</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>*px</span><span style='font-family:宋体;color:#555555;background:white'>可出现在</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>x</span><span style='font-family:宋体;color:#555555;background:white'>能出现的任何地方。例如</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>:</span><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:#555555'><br>
<span style='background:white'>&nbsp; &nbsp; &nbsp; y=*px+5;&nbsp; /*</span></span><span
style='font-family:宋体;color:#555555;background:white'>表示把</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>x</span><span style='font-family:宋体;color:#555555;background:white'>的内容加</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>5</span><span style='font-family:宋体;color:#555555;background:white'>并赋给</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>y*/</span><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:#555555'><br>
<span style='background:white'>&nbsp; &nbsp; &nbsp; y=++*px;&nbsp; /*px</span></span><span
style='font-family:宋体;color:#555555;background:white'>的内容加上</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>1</span><span style='font-family:宋体;color:#555555;background:white'>之后赋给</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>y</span><span style='font-family:宋体;color:#555555;background:white'>，</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>++*px</span><span style='font-family:宋体;color:#555555;background:white'>相当于</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>++(*px)*/</span><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:#555555'><br>
<span style='background:white'>&nbsp; &nbsp; &nbsp; y=*px++;&nbsp; /*</span></span><span
style='font-family:宋体;color:#555555;background:white'>相当于</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>y=*px; px++*/</span><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:#555555'><br>
<br>
</span><span style='font-family:宋体;color:#555555;background:white'>【例</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>10.1</span><span style='font-family:宋体;color:#555555;background:white'>】</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555'><br>
<span style='background:white'>main()</span><br>
<span style='background:white'>{ int a,b;</span><br>
<span style='background:white'>&nbsp; int *pointer_1, *pointer_2;</span><br>
<span style='background:white'>&nbsp; a=100;b=10;</span><br>
<span style='background:white'>&nbsp; pointer_1=&amp;a;</span><br>
<span style='background:white'>pointer_2=&amp;b;</span><br>
<span style='background:white'>&nbsp; printf(&quot;%d,%d\n&quot;,a,b);</span><br>
<span style='background:white'>&nbsp; printf(&quot;%d,%d\n&quot;,*pointer_1,
*pointer_2);</span><br>
<span style='background:white'>}</span><br>
<br>
</span><b><span style='font-family:宋体;color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>对程序的说明：</span></b><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:#555555'><br>
<br>
</span></p>

<p class=MsoNormal align=left style='margin-left:22.5pt;text-align:left;
text-indent:-18.0pt;line-height:16.5pt;background:white'><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:#555555'>1.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体;color:green;border:none windowtext 1.0pt;
padding:0cm'>在开头处虽然定义了两个指针变量</span><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:green;border:none windowtext 1.0pt;padding:0cm'>pointer_1</span><span
style='font-family:宋体;color:green;border:none windowtext 1.0pt;padding:0cm'>和</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm'>pointer_2</span><span style='font-family:宋体;color:green;
border:none windowtext 1.0pt;padding:0cm'>，担它们并未指向任何一个整型变量。只是提供两个指针变量，规定它们可以指向整型变量。程序第</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm'>5</span><span style='font-family:宋体;color:green;border:none windowtext 1.0pt;
padding:0cm'>、</span><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:green;border:none windowtext 1.0pt;padding:0cm'>6</span><span
style='font-family:宋体;color:green;border:none windowtext 1.0pt;padding:0cm'>行的作用就是使</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm'>pointer_1</span><span style='font-family:宋体;color:green;
border:none windowtext 1.0pt;padding:0cm'>指向</span><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm'>a</span><span style='font-family:宋体;color:green;border:none windowtext 1.0pt;
padding:0cm'>，</span><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:green;border:none windowtext 1.0pt;padding:0cm'>pointer_2</span><span
style='font-family:宋体;color:green;border:none windowtext 1.0pt;padding:0cm'>指向</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm'>b</span><span style='font-family:宋体;color:green;border:none windowtext 1.0pt;
padding:0cm'>。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'><img width=32 height=32
src="10.files/image002.png" style='text-decoration:initial;border-bottom-width:
0px;border-left-width:0px;border-right-width:0px;border-top-width:0px;
font-size:14px;list-style-type:none;margin-bottom:0px;margin-left:0px;
margin-right:0px;margin-top:0px;padding-bottom:0px;padding-left:0px;padding-right:
0px;padding-top:0px'></span><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:#555555'><br>
<br>
</span></p>

<p class=MsoNormal align=left style='margin-left:22.5pt;text-align:left;
text-indent:-18.0pt;line-height:16.5pt;background:white'><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:#555555'>2.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体;color:green;border:none windowtext 1.0pt;
padding:0cm'>最后一行的</span><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:green;border:none windowtext 1.0pt;padding:0cm'>*pointer_1</span><span
style='font-family:宋体;color:green;border:none windowtext 1.0pt;padding:0cm'>和</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm'>*pointer_2</span><span style='font-family:宋体;color:green;
border:none windowtext 1.0pt;padding:0cm'>就是变量</span><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm'>a</span><span style='font-family:宋体;color:green;border:none windowtext 1.0pt;
padding:0cm'>和</span><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:green;border:none windowtext 1.0pt;padding:0cm'>b</span><span
style='font-family:宋体;color:green;border:none windowtext 1.0pt;padding:0cm'>。最后两个</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm'>printf</span><span style='font-family:宋体;color:green;border:none windowtext 1.0pt;
padding:0cm'>函数作用是相同的。</span></p>

<p class=MsoNormal align=left style='margin-left:22.5pt;text-align:left;
text-indent:-18.0pt;line-height:16.5pt;background:white'><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:#555555'>3.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体;color:green;border:none windowtext 1.0pt;
padding:0cm'>程序中有两处出现</span><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:green;border:none windowtext 1.0pt;padding:0cm'>*pointer_1</span><span
style='font-family:宋体;color:green;border:none windowtext 1.0pt;padding:0cm'>和</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm'>*pointer_2</span><span style='font-family:宋体;color:green;
border:none windowtext 1.0pt;padding:0cm'>，请区分它们的不同含义。</span></p>

<p class=MsoNormal align=left style='margin-left:22.5pt;text-align:left;
text-indent:-18.0pt;line-height:16.5pt;background:white'><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:#555555'>4.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体;color:green;border:none windowtext 1.0pt;
padding:0cm'>程序第</span><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:green;border:none windowtext 1.0pt;padding:0cm'>5</span><span
style='font-family:宋体;color:green;border:none windowtext 1.0pt;padding:0cm'>、</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm'>6</span><span style='font-family:宋体;color:green;border:none windowtext 1.0pt;
padding:0cm'>行的</span><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:green;border:none windowtext 1.0pt;padding:0cm'>“pointer_1=&amp;a”</span><span
style='font-family:宋体;color:green;border:none windowtext 1.0pt;padding:0cm'>和</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm'> “pointer_2=&amp;b”</span><span style='font-family:宋体;color:green;
border:none windowtext 1.0pt;padding:0cm'>不能写成</span><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm'>“*pointer_1=&amp;a”</span><span style='font-family:宋体;color:green;
border:none windowtext 1.0pt;padding:0cm'>和</span><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm'> “*pointer_2=&amp;b”</span><span style='font-family:宋体;color:green;
border:none windowtext 1.0pt;padding:0cm'>。</span></p>

<p class=MsoNormal align=left style='text-align:left'><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:#555555'><br>
</span><b><span style='font-family:宋体;color:blue;border:none windowtext 1.0pt;
padding:0cm;background:white'>请对下面再的关于</span></b><b><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:blue;border:none windowtext 1.0pt;
padding:0cm;background:white'>“&amp;”</span></b><b><span style='font-family:
宋体;color:blue;border:none windowtext 1.0pt;padding:0cm;background:white'>和</span></b><b><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:blue;border:none windowtext 1.0pt;
padding:0cm;background:white'>“*”</span></b><b><span style='font-family:宋体;
color:blue;border:none windowtext 1.0pt;padding:0cm;background:white'>的问题进行考虑：</span></b><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555'><br>
<br>
</span></p>

<p class=MsoNormal align=left style='margin-left:22.5pt;text-align:left;
text-indent:-18.0pt;line-height:16.5pt;background:white'><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:#555555'>1.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style='font-family:宋体;color:blue;border:none windowtext 1.0pt;
padding:0cm'>如果已经执行了</span><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:blue;border:none windowtext 1.0pt;padding:0cm'>“pointer_1=&amp;a</span><span
style='font-family:宋体;color:blue;border:none windowtext 1.0pt;padding:0cm'>；</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:blue;border:none windowtext 1.0pt;
padding:0cm'>”</span><span style='font-family:宋体;color:blue;border:none windowtext 1.0pt;
padding:0cm'>语句，则</span><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:blue;border:none windowtext 1.0pt;padding:0cm'>&amp;*pointer_1</span><span
style='font-family:宋体;color:blue;border:none windowtext 1.0pt;padding:0cm'>是什么含义？</span></p>

<p class=MsoNormal align=left style='margin-left:22.5pt;text-align:left;
text-indent:-18.0pt;line-height:16.5pt;background:white'><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:#555555'>2.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:blue;border:none windowtext 1.0pt;padding:0cm'>*&amp;a</span><span
style='font-family:宋体;color:blue;border:none windowtext 1.0pt;padding:0cm'>含义是什么？</span></p>

<p class=MsoNormal align=left style='margin-left:22.5pt;text-align:left;
text-indent:-18.0pt;line-height:16.5pt;background:white'><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:#555555'>3.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:blue;border:none windowtext 1.0pt;padding:0cm'>(pointer_1)++</span><span
style='font-family:宋体;color:blue;border:none windowtext 1.0pt;padding:0cm'>和</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:blue;border:none windowtext 1.0pt;
padding:0cm'>pointer_1++</span><span style='font-family:宋体;color:blue;
border:none windowtext 1.0pt;padding:0cm'>的区别？</span></p>

<p class=MsoNormal><span style='font-family:宋体;color:#555555;background:white'>【例</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>10.2</span><span style='font-family:宋体;color:#555555;background:white'>】输入</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>a</span><span style='font-family:宋体;color:#555555;background:white'>和</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>b</span><span style='font-family:宋体;color:#555555;background:white'>两个整数，按先大后小的顺序输出</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>a</span><span style='font-family:宋体;color:#555555;background:white'>和</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>b</span><span style='font-family:宋体;color:#555555;background:white'>。</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555'><br>
<span style='background:white'>main()</span><br>
<span style='background:white'>{ int *p1,*p2,*p,a,b;</span><br>
<span style='background:white'>&nbsp; scanf(&quot;%d,%d&quot;,&amp;a,&amp;b);</span><br>
<span style='background:white'>&nbsp; p1=&amp;a;p2=&amp;b;</span><br>
<span style='background:white'>&nbsp; if(a&lt;b)</span><br>
<span style='background:white'>&nbsp;&nbsp;&nbsp; {p=p1;p1=p2;p2=p;}</span><br>
<span style='background:white'>&nbsp; printf(&quot;\na=%d,b=%d\n&quot;,a,b);</span><br>
<span style='background:white'>&nbsp; printf(&quot;max=%d,min=%d\n&quot;,*p1,
*p2);</span><br>
<span style='background:white'>}</span></span></p>

<p class=MsoNormal><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:#555555;background:white'>&nbsp;</span></p>

<p class=MsoNormal><span style='font-family:宋体;color:#555555;background:white'>函数的参数不仅可以是整型、实型、字符型等数据，还可以是指针类型。它的作用是将一个变量的地址传送到另一个函数中。</span></span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555'><br
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
<br style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
</span><span style='font-family:宋体;color:#555555;background:white'><span
style='orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;float:none;word-spacing:0px'>【例</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>10.3</span><span style='font-family:宋体;color:#555555;background:white'>】题目同例</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>10.2</span><span style='font-family:宋体;color:#555555;background:white'>，即输入的两个整数按大小顺序输出。今用函数处理，而且用指针类型的数据作函数参数。</span></span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555'><br
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>swap(int *p1,int *p2)</span></span><br
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>{int temp;</span></span><br style='text-decoration:
initial;orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>&nbsp;temp=*p1;</span></span><br style='text-decoration:
initial;orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>&nbsp;*p1=*p2;</span></span><br style='text-decoration:
initial;orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>&nbsp;*p2=temp;</span></span><br style='text-decoration:
initial;orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>}</span></span><br style='text-decoration:initial;
orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>main()</span></span><br style='text-decoration:
initial;orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>{</span></span><br style='text-decoration:initial;
orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>int a,b;</span></span><br style='text-decoration:
initial;orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>int *pointer_1,*pointer_2;</span></span><br
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>&nbsp; scanf(&quot;%d,%d&quot;,&amp;a,&amp;b);</span></span><br
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>&nbsp; pointer_1=&amp;a;pointer_2=&amp;b;</span></span><br
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>&nbsp; if(a&lt;b) swap(pointer_1,pointer_2);</span></span><br
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>&nbsp; printf(&quot;\n%d,%d\n&quot;,a,b);</span></span><br
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>&nbsp; }</span></span><br style='text-decoration:
initial;orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'>
<br style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
</span><strong style='text-decoration:initial'><span style='font-family:宋体;
color:green;border:none windowtext 1.0pt;padding:0cm;background:white'><span
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>对程序的说明：</span></span></strong><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:#555555'><br style='text-decoration:initial;orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
word-spacing:0px'>
</span><span lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;
border:none windowtext 1.0pt;padding:0cm;background:white'><span
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>1</span><span style='font-family:宋体;color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>、</span><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:green;border:none windowtext 1.0pt;padding:0cm;background:white'>swap</span><span
style='font-family:宋体;color:green;border:none windowtext 1.0pt;padding:0cm;
background:white'>是用户定义的函数，它的作用是交换两个变量（</span><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>a</span><span style='font-family:宋体;color:green;
border:none windowtext 1.0pt;padding:0cm;background:white'>和</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>b</span><span style='font-family:宋体;color:green;
border:none windowtext 1.0pt;padding:0cm;background:white'>）的值。</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>swap</span><span style='font-family:宋体;
color:green;border:none windowtext 1.0pt;padding:0cm;background:white'>函数的形参</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>p1</span><span style='font-family:宋体;color:green;
border:none windowtext 1.0pt;padding:0cm;background:white'>、</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>p2</span><span style='font-family:宋体;color:green;
border:none windowtext 1.0pt;padding:0cm;background:white'>是指针变量。程序运行时，先执行</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>main</span><span style='font-family:宋体;
color:green;border:none windowtext 1.0pt;padding:0cm;background:white'>函数，输入</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>a</span><span style='font-family:宋体;color:green;
border:none windowtext 1.0pt;padding:0cm;background:white'>和</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>b</span><span style='font-family:宋体;color:green;
border:none windowtext 1.0pt;padding:0cm;background:white'>的值。然后将</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>a</span><span style='font-family:宋体;color:green;
border:none windowtext 1.0pt;padding:0cm;background:white'>和</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>b</span><span style='font-family:宋体;color:green;
border:none windowtext 1.0pt;padding:0cm;background:white'>的地址分别赋给指针变量</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>pointer_1</span><span style='font-family:宋体;
color:green;border:none windowtext 1.0pt;padding:0cm;background:white'>和</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>pointer_2</span><span style='font-family:宋体;
color:green;border:none windowtext 1.0pt;padding:0cm;background:white'>，使</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>pointer_1</span><span style='font-family:宋体;
color:green;border:none windowtext 1.0pt;padding:0cm;background:white'>指向</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>a</span><span style='font-family:宋体;color:green;
border:none windowtext 1.0pt;padding:0cm;background:white'>，</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>pointer_2</span><span style='font-family:宋体;
color:green;border:none windowtext 1.0pt;padding:0cm;background:white'>指向</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>b</span><span style='font-family:宋体;color:green;
border:none windowtext 1.0pt;padding:0cm;background:white'>。</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'><br style='text-decoration:initial'>
<img width=32 height=32 src="10.files/image002.png" style='text-decoration:
initial;border-bottom-width:0px;border-left-width:0px;border-right-width:0px;
border-top-width:0px;font-size:14px;list-style-type:none;margin-bottom:0px;
margin-left:0px;margin-right:0px;margin-top:0px;padding-bottom:0px;padding-left:
0px;padding-right:0px;padding-top:0px'><br style='text-decoration:initial'>
<br style='text-decoration:initial'>
2</span><span style='font-family:宋体;color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>、接着执行</span><span lang=EN-US style='font-family:
"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;padding:0cm;
background:white'>if</span><span style='font-family:宋体;color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>语句，由于</span><span lang=EN-US style='font-family:
"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;padding:0cm;
background:white'>a</span><span style='font-family:宋体;color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>〈</span><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:green;border:none windowtext 1.0pt;padding:0cm;background:white'>b</span><span
style='font-family:宋体;color:green;border:none windowtext 1.0pt;padding:0cm;
background:white'>，因此执行</span><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:green;border:none windowtext 1.0pt;padding:0cm;background:white'>swap</span><span
style='font-family:宋体;color:green;border:none windowtext 1.0pt;padding:0cm;
background:white'>函数。注意实参</span><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:green;border:none windowtext 1.0pt;padding:0cm;background:white'>pointer_1</span><span
style='font-family:宋体;color:green;border:none windowtext 1.0pt;padding:0cm;
background:white'>和</span><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:green;border:none windowtext 1.0pt;padding:0cm;background:white'>pointer_2</span><span
style='font-family:宋体;color:green;border:none windowtext 1.0pt;padding:0cm;
background:white'>是指针变量，在函数调用时，将实参变量的值传递给形参变量。采取的依然是</span><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>“</span><span style='font-family:宋体;color:green;
border:none windowtext 1.0pt;padding:0cm;background:white'>值传递</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>”</span><span style='font-family:宋体;color:green;
border:none windowtext 1.0pt;padding:0cm;background:white'>方式。因此虚实结合后形参</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>p1</span><span style='font-family:宋体;color:green;
border:none windowtext 1.0pt;padding:0cm;background:white'>的值为</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>&amp;a</span><span style='font-family:宋体;
color:green;border:none windowtext 1.0pt;padding:0cm;background:white'>，</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>p2</span><span style='font-family:宋体;color:green;
border:none windowtext 1.0pt;padding:0cm;background:white'>的值为</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>&amp;b</span><span style='font-family:宋体;
color:green;border:none windowtext 1.0pt;padding:0cm;background:white'>。这时</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>p1</span><span style='font-family:宋体;color:green;
border:none windowtext 1.0pt;padding:0cm;background:white'>和</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>pointer_1</span><span style='font-family:宋体;
color:green;border:none windowtext 1.0pt;padding:0cm;background:white'>指向变量</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>a</span><span style='font-family:宋体;color:green;
border:none windowtext 1.0pt;padding:0cm;background:white'>，</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>p2</span><span style='font-family:宋体;color:green;
border:none windowtext 1.0pt;padding:0cm;background:white'>和</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>pointer_2</span><span style='font-family:宋体;
color:green;border:none windowtext 1.0pt;padding:0cm;background:white'>指向变量</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>b</span><span style='font-family:宋体;color:green;
border:none windowtext 1.0pt;padding:0cm;background:white'>。</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'><br style='text-decoration:initial'>
<img width=32 height=32 src="10.files/image002.png" style='text-decoration:
initial;border-bottom-width:0px;border-left-width:0px;border-right-width:0px;
border-top-width:0px;font-size:14px;list-style-type:none;margin-bottom:0px;
margin-left:0px;margin-right:0px;margin-top:0px;padding-bottom:0px;padding-left:
0px;padding-right:0px;padding-top:0px'><br style='text-decoration:initial'>
<br style='text-decoration:initial'>
3</span><span style='font-family:宋体;color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>、接着执行执行</span><span lang=EN-US style='font-family:
"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;padding:0cm;
background:white'>swap</span><span style='font-family:宋体;color:green;
border:none windowtext 1.0pt;padding:0cm;background:white'>函数的函数体使</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>*p1</span><span style='font-family:宋体;color:green;
border:none windowtext 1.0pt;padding:0cm;background:white'>和</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>*p2</span><span style='font-family:宋体;color:green;
border:none windowtext 1.0pt;padding:0cm;background:white'>的值互换，也就是使</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>a</span><span style='font-family:宋体;color:green;
border:none windowtext 1.0pt;padding:0cm;background:white'>和</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>b</span><span style='font-family:宋体;color:green;
border:none windowtext 1.0pt;padding:0cm;background:white'>的值互换。函数调用结束后，</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>p1</span><span style='font-family:宋体;color:green;
border:none windowtext 1.0pt;padding:0cm;background:white'>和</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>p2</span><span style='font-family:宋体;color:green;
border:none windowtext 1.0pt;padding:0cm;background:white'>不复存在（已释放）如图。</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'><br style='text-decoration:initial'>
<img width=32 height=32 src="10.files/image002.png" style='text-decoration:
initial;border-bottom-width:0px;border-left-width:0px;border-right-width:0px;
border-top-width:0px;font-size:14px;list-style-type:none;margin-bottom:0px;
margin-left:0px;margin-right:0px;margin-top:0px;padding-bottom:0px;padding-left:
0px;padding-right:0px;padding-top:0px'><br style='text-decoration:initial'>
<br style='text-decoration:initial'>
4</span><span style='font-family:宋体;color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>、最后在</span><span lang=EN-US style='font-family:
"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;padding:0cm;
background:white'>main</span><span style='font-family:宋体;color:green;
border:none windowtext 1.0pt;padding:0cm;background:white'>函数中输出的</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>a</span><span style='font-family:宋体;color:green;
border:none windowtext 1.0pt;padding:0cm;background:white'>和</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:green;border:none windowtext 1.0pt;
padding:0cm;background:white'>b</span><span style='font-family:宋体;color:green;
border:none windowtext 1.0pt;padding:0cm;background:white'>的值是已经过交换的值。</span></span><span
style='font-family:宋体;color:red;border:none windowtext 1.0pt;padding:0cm;
background:white'><span style='text-decoration:initial;orphans: 2;text-align:
start;widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
word-spacing:0px'>请注意交换</span><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:red;border:none windowtext 1.0pt;padding:0cm;background:white'>*p1</span><span
style='font-family:宋体;color:red;border:none windowtext 1.0pt;padding:0cm;
background:white'>和</span><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:red;border:none windowtext 1.0pt;padding:0cm;background:white'>*p2</span><span
style='font-family:宋体;color:red;border:none windowtext 1.0pt;padding:0cm;
background:white'>的值是如何实现的。</span></span><span style='font-family:宋体;
color:#555555;background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>请找出下列程序段的错误：</span></span><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:#555555'><br style='text-decoration:
initial;orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'>
<br style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>swap(int *p1,int *p2)</span></span><br
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>{int *temp;</span></span><br style='text-decoration:
initial;orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>&nbsp;*temp=*p1;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /*</span></span><span
style='font-family:宋体;color:#555555;background:white'>此语句有问题</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>*/</span></span><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:#555555'><br style='text-decoration:initial;orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
word-spacing:0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>&nbsp;*p1=*p2;</span></span><br style='text-decoration:
initial;orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>&nbsp;*p2=temp;</span></span><br style='text-decoration:
initial;orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>}</span></span><br style='text-decoration:initial;
orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'>
</span><span style='font-family:宋体;color:#555555;background:white'><span
style='orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;float:none;word-spacing:0px'>请考虑下面的函数能否实现实现</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>a</span><span style='font-family:宋体;color:#555555;background:white'>和</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>b</span><span style='font-family:宋体;color:#555555;background:white'>互换。</span></span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555'><br
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>swap(int x,int y)</span></span><br
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>{int temp;</span></span><br style='text-decoration:
initial;orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>&nbsp;temp=x</span></span><span style='font-family:
宋体;color:#555555;background:white'>；</span></span><span lang=EN-US
style='font-family:"Tahoma","sans-serif";color:#555555'><br style='text-decoration:
initial;orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>&nbsp;x=y;</span></span><br style='text-decoration:
initial;orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>&nbsp;y=temp;</span></span><br style='text-decoration:
initial;orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>}</span></span><br style='text-decoration:initial;
orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'>
</span><span style='font-family:宋体;color:#555555;background:white'><span
style='orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;float:none;word-spacing:0px'>如果在</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>main</span><span style='font-family:宋体;color:#555555;background:white'>函数中用</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>“swap(a,b)</span><span style='font-family:宋体;color:#555555;background:
white'>；</span><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:#555555;background:white'>”</span><span style='font-family:宋体;color:#555555;
background:white'>调用</span><span lang=EN-US style='font-family:"Tahoma","sans-serif";
color:#555555;background:white'>swap</span><span style='font-family:宋体;
color:#555555;background:white'>函数，会有什么结果呢？请看下图所示。</span></span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555'><br
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
</span><span lang=EN-US><img width=32 height=32 src="10.files/image002.png"
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;background-color:
white;border-bottom-width:0px;border-left-width:0px;border-right-width:0px;
border-top-width:0px;color:#555555;font-family:Tahoma, Verdana, sans-serif;
font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;
letter-spacing:normal;line-height:22px;list-style-type:none;margin-bottom:0px;
margin-left:0px;margin-right:0px;margin-top:0px;padding-bottom:0px;padding-left:
0px;padding-right:0px;padding-top:0px;text-indent:0px;text-transform:none;
white-space:normal;word-spacing:0px'></span><span lang=EN-US style='font-family:
"Tahoma","sans-serif";color:#555555'><br style='text-decoration:initial;
orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'>
<br style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
</span><span style='font-family:宋体;color:#555555;background:white'><span
style='orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;float:none;word-spacing:0px'>【例</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>10.4</span><span style='font-family:宋体;color:#555555;background:white'>】请注意，不能企图通过改变指针形参的值而使指针实参的值改变。</span></span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555'><br
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>swap(int *p1,int *p2)</span></span><br
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>{int *p;</span></span><br style='text-decoration:
initial;orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>&nbsp;p=p1;</span></span><br style='text-decoration:
initial;orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>&nbsp;p1=p2;</span></span><br style='text-decoration:
initial;orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>&nbsp;p2=p;</span></span><br style='text-decoration:
initial;orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>}</span></span><br style='text-decoration:initial;
orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>main()</span></span><br style='text-decoration:
initial;orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>{</span></span><br style='text-decoration:initial;
orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>int a,b;</span></span><br style='text-decoration:
initial;orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>int *pointer_1,*pointer_2;</span></span><br
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>&nbsp; scanf(&quot;%d,%d&quot;,&amp;a,&amp;b);</span></span><br
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>&nbsp; pointer_1=&amp;a;pointer_2=&amp;b;</span></span><br
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>&nbsp; if(a&lt;b) swap(pointer_1,pointer_2);</span></span><br
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>&nbsp;
printf(&quot;\n%d,%d\n&quot;,*pointer_1,*pointer_2);</span></span><br
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>&nbsp; }</span></span><br style='text-decoration:
initial;orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'>
<br style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
</span><span style='font-family:宋体;color:#555555;background:white'><span
style='orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;float:none;word-spacing:0px'>其中的问题在于不能实现如图所示的第四步（</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>d</span><span style='font-family:宋体;color:#555555;background:white'>）。</span></span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555'><br
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
</span><span lang=EN-US><img width=32 height=32 src="10.files/image002.png"
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;background-color:
white;border-bottom-width:0px;border-left-width:0px;border-right-width:0px;
border-top-width:0px;color:#555555;font-family:Tahoma, Verdana, sans-serif;
font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;
letter-spacing:normal;line-height:22px;list-style-type:none;margin-bottom:0px;
margin-left:0px;margin-right:0px;margin-top:0px;padding-bottom:0px;padding-left:
0px;padding-right:0px;padding-top:0px;text-indent:0px;text-transform:none;
white-space:normal;word-spacing:0px'></span><span lang=EN-US style='font-family:
"Tahoma","sans-serif";color:#555555'><br style='text-decoration:initial;
orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'>
</span><span style='font-family:宋体;color:#555555;background:white'><span
style='orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;float:none;word-spacing:0px'>【例</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>10.5</span><span style='font-family:宋体;color:#555555;background:white'>】输入</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>a</span><span style='font-family:宋体;color:#555555;background:white'>、</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>b</span><span style='font-family:宋体;color:#555555;background:white'>、</span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555;background:
white'>c3</span><span style='font-family:宋体;color:#555555;background:white'>个整数，按大小顺序输出。</span></span><span
lang=EN-US style='font-family:"Tahoma","sans-serif";color:#555555'><br
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>swap(int *pt1,int *pt2)</span></span><br
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>{int temp;</span></span><br style='text-decoration:
initial;orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>&nbsp;temp=*pt1;</span></span><br
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>&nbsp;*pt1=*pt2;</span></span><br
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>&nbsp;*pt2=temp;</span></span><br
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>}</span></span><br style='text-decoration:initial;
orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>exchange(int *q1,int *q2,int *q3)</span></span><br
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>{ if(*q1&lt;*q2)swap(q1,q2);</span></span><br
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>if(*q1&lt;*q3)swap(q1,q3);</span></span><br
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>if(*q2&lt;*q3)swap(q2,q3);</span></span><br
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>}</span></span><br style='text-decoration:initial;
orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>main()</span></span><br style='text-decoration:
initial;orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>{</span></span><br style='text-decoration:initial;
orphans: 2;text-align:start;widows: 2;-webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>int a,b,c,*p1,*p2,*p3;</span></span><br
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>&nbsp;
scanf(&quot;%d,%d,%d&quot;,&amp;a,&amp;b,&amp;c);</span></span><br
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>&nbsp; p1=&amp;a;p2=&amp;b; p3=&amp;c;</span></span><br
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>&nbsp; exchange(p1,p2,p3);</span></span><br
style='text-decoration:initial;orphans: 2;text-align:start;widows: 2;
-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;word-spacing:
0px'>
<span style='background:white'><span style='orphans: 2;text-align:start;
widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;
float:none;word-spacing:0px'>&nbsp; printf(&quot;\n%d,%d,%d \n&quot;,a,b,c);</span></span></span></p>

<h1><span lang=EN-US>&nbsp;</span></h1>

</div>

</body>

</html>
